﻿using System;
using DC2010.Events;
using DC2010.Objects.Base;

namespace DC2010.Objects.Data
{
    [Serializable]
    public class EventData : BaseData
    {
	
        public EventGfx Gfx
        {
            get
            {
                if (!string.IsNullOrEmpty(GfxId))
                {
                    return Root.I.EventSystem.GetGfx(GfxId);
                }

                return null;
            }
        }	
		
        private EventLogic _l;
        public EventLogic L
        {
            get
            {
                if (_l == null)
                    _l = Root.I.EventSystem.InstantiateEvent(this);

                return _l;
            }
        }
    }
}
